package com.jiai.cloud.feign;

import com.jiai.cloud.entity.TGoodType;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;


@FeignClient("authentication")
public interface GoodTypeAPI {

    //增
    @RequestMapping(value="/api/v1/goodtype/addGoodType")
    Object addGoodType(@RequestBody TGoodType tGoodType);

    //删
    @RequestMapping(value="/api/v1/goodtype/delete/{id}")
    Object delete(@PathVariable("id") Integer id);

    //ID查
    @RequestMapping(value = "/api/v1/goodtype/findById/{id}")
    Object selectById(@PathVariable("id") Integer id);

    //查所有
    @RequestMapping(value = "/api/v1/goodtype/findByAll/{page}")
    Object selectPage(@PathVariable("page") Integer page);

    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/goodtype/edit")
    @ResponseBody
    Object edit(TGoodType tGoodType);

}